package g4.map;
import com.google.android.maps.OverlayItem;
import com.google.android.maps.GeoPoint;
import java.util.TreeMap;
//import android.os.Bundle;
import java.lang.Double;
import java.util.ArrayList;


public class CustomOverlay extends OverlayItem{

	String Image;
	//Suunta suunta;
	
public CustomOverlay(GeoPoint point, String title, String snippet){
	
	super(point, title, snippet);

}

//Aika riski konstruktori
public CustomOverlay(TreeMap<String, String> in){
	
	super(new GeoPoint((int) (Double.parseDouble(in.get("lat")) * 1E6),(int) (Double.parseDouble(in.get("lng")) * 1E6)), in.get("caption"), in.get("value"));

}

public ArrayList<String> toArrayList(){
	
	ArrayList<String> temp = new ArrayList<String>();
	temp.add("Begin");
	temp.add("value:" + getSnippet());
	temp.add("caption:" + getTitle());
	temp.add("lat:" + new Double(getPoint().getLatitudeE6()) / 1E6);
	temp.add("lng:" + new Double(getPoint().getLongitudeE6()) / 1E6);
	temp.add("End");
	return temp;
}


public boolean hasImage(){
	return(Image.equals(null));
}


public void setImage(String Image_){
	Image = Image_;
}
	
	
}